# 实例化浏览器驱动
import time

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.ie.service import Service

def demo():

    service = Service("C:/Program Files/Google/Chrome/Application/chromedriver.exe")
    driver = webdriver.Chrome(service=service)
    driver.maximize_window() # 最大化窗口
    driver.implicitly_wait(10) # 隐式等待
    driver.get("http://192.168.10.139/")

    driver.find_element(By.CLASS_NAME, "red").click()
    time.sleep(3)
    driver.close()

demo()